package com.zy.paratest.service;


import com.zy.paratest.repository.GrilRepository;
import com.zy.paratest.domain.Girl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

@Service
public class GirlService {

    @Autowired
    private GrilRepository grilRepository;

    @Transactional
    public void girlAddtwo() {

        Girl girlA = new Girl();
        girlA.setName("xiaoqi");
        girlA.setWeight(55);
        girlA.setHeight(166);
        girlA.setAge(25);
        grilRepository.save(girlA);

        Girl girlB = new Girl();
        girlB.setName("libai");
        girlB.setWeight(70);
        girlB.setHeight(165);
        girlB.setAge(40);
        grilRepository.save(girlB);

    }

}
